﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using System.Security.Cryptography;

namespace BLL
{
    public class UserManager
    {
        /// <summary>
        /// 数据访问层
        /// </summary>
        private UserService us = new UserService();

        public bool UserLogin(string name, string pass)
        {
            MD5 md5 = MD5.Create();
            byte[] bytes = Encoding.Default.GetBytes(name + pass + "i am so good");
            byte[] hash = md5.ComputeHash(bytes);
            pass = Convert.ToBase64String(hash,0,hash.Length);
            return us.UserLogin(name, pass);
        }
    }
}
